<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />

    <title>reveal.js</title>

    <link rel="stylesheet" href="dist/reset.css" />
    <link rel="stylesheet" href="dist/reveal.css" />
    <link rel="stylesheet" href="dist/theme/black.css" id="theme" />

    <!-- Theme used for syntax highlighted code -->
    <link
      rel="stylesheet"
      href="plugin/highlight/monokai.css"
      id="highlight-theme"
    />
  </head>
  <body>
    <div class="reveal">
      <div class="slides">
        <section class="shrink">
          <p>First internal training</p>
          <p>1.代码规范</p>
          <p>2.日常git使用</p>
        </section>
        <!-- 代码规范 -->
        <section data-transition="fade">
          <p class="fragment fade-out">发现项目中的错误写法</p>
          <p style="display: inline-block" class="fragment fade-down">
            模块命名
          </p>
          <pre style="display: inline-block" class="fragment fade-up">
            <code style="font-size: 13px;">
              import { log } from "@/utils/tools"; 
              import TableComponent from "./components/TableComponent"; 
              import mixinsPlatform from "../../mixins/mixinsPlatform";
            </code>
            <code style="font-size: 13px;">
              import MixinsPlatform from "../../mixins/mixinsPlatform";
            </code>
        </pre>
        </section>
        <section data-transition="slide">
          <section>
            <p>变量、函数命名</p>
            <pre style="display: inline-block" class="fragment fade-up">
              <code style="font-size: 13px;">
                data() {
                  return {
                    orgId: localStorage.orgId || "AABBCCDDEEFFGGHH66",
                    orgname: localStorage.getItem("orgName") || "",
                    monthvalue: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
                    startTime: "2020年1月1日",
                  }
                }
              </code>
            
          </pre>
          </section>

          <section>
            <pre>
            <code style="font-size: 13px;">
              data() {
                return {
                  orgId: localStorage.orgId || "AABBCCDDEEFFGGHH66",
                  orgName: localStorage.getItem("orgName") || "",
                  monthValue: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
                }
              },
              methods: {
                getUSerInfo(){
                  return {name:'zhj'}
                }
              }
            </code>
          </pre>
          </section>
        </section>
        <section data-transition="convex">
          <p>常量</p>
          <pre style="display: inline-block" class="fragment fade-up">
            <code style="font-size: 13px;">
              import BaseTable from "@/components/base/BaseTable";
              const serveAPI = "/operation-server";
            </code>
            <code style="font-size: 13px;">
              const SERVEAPI = "/operation-server";
              export default {
                methods: {
                  abc(){
                    const offlineEndTimestamp = new Date()
                  }
                }
              }
            </code>
        </pre>
        </section>
        <section data-transition="concave">
          <p>注释规范</p>
          <pre style="display: inline-block" class="fragment fade-up">
            <code style="font-size: 13px;">
              // 单行注释（多用于解释下方少量代码块的用意）
              setTitle();
              var maxCount = 10; // 在代码后面注释（多用于解释某个字段的寓意）
              // setName(); // 注释代码
              /**
               * 模板、游戏预览(标题)
               * @description （描述）
               * @param row {object} 入参描述
               * @param previewType {string} 入参描述
               * @return {String} （返回值描述）
               * */
              previewModal(row, previewType) {
                return ''
              }
            </code>
            
        </pre>
        </section>
        <section data-transition="zoom">
          <p>其他</p>
          <pre style="display: inline-block" class="fragment fade-up">
            <code style="font-size: 13px;">
              1.图片标签的 alt 属性不能为空
              2.视觉设计内容建议使用伪属性 :before 或 :after 来模拟，而不是添加新的 HTML 标签：
              <!-- 不推荐使用 -->
                <!-- html 代码:-->
                <span class="text-box">
                  <span class="square"></span>
                  See the square next to me?
                </span>
                <!--css 代码:-->
                .text-box > .square {
                  display: inline-block;
                  width: 1rem;
                  height: 1rem;
                  background-color: red;
                }
              <!-- 推荐使用 -->
                <!-- html 代码:-->
                <span class="text-box">
                  See the square next to me?
                </span>
                <!--css 代码:-->
                .text-box:before {
                  content: "";
                  display: inline-block;
                  width: 1rem;
                  height: 1rem;
                  background-color: red;
                }
            </code>
            <a href="https://code.data4truth.com/FrontEnd/pub-material/blob/master/%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91%E8%A7%84%E8%8C%83.md" target="view_window">详细规范</a>
        </pre>
        </section>
        <!-- git使用 -->
        <section data-transition="convex">
          <section>
            <p>
              <a
                href="https://www.jianshu.com/p/c84c03aafb70"
                target="view_window"
                >日常git的操作请看</a
              >
            </p>
            <p>项目开发中的问题收集</p>
            <p style="font-size: 25px; text-align: left">0.如何新建分支</p>
            <p style="font-size: 20px; text-align: left">git clone git@... ;</p>
            <p style="font-size: 20px; text-align: left">
              git checkout release-x.x //查看分支图。切换到最新主分支 git
              checkout -b feature-x.x-module-name
            </p>
            <a
              href="https://code.data4truth.com/pi/pi-heng/network/master"
              target="view_window"
              style="font-size: 20px"
              >pi-heng分支图</a
            >
          </section>
          <section>
            <p>1.代码如何合并</p>
            <p style="font-size: 20px; text-align: left">
              git checkout feature-x.x; git pull; //
              切换到主分支，并拉取最新代码
            </p>
            <p style="font-size: 20px; text-align: left">
              git merge feature-1.x-coupon-hhs;
            </p>
            <p style="font-size: 20px; text-align: left">git pull;</p>
            <p style="font-size: 20px; text-align: left">git push;</p>
            <p style="font-size: 20px; text-align: left">
              git checkout feature-1.x-coupon-hhs;
            </p>
          </section>
          <section>
            <p>2.分支的管理</p>

            <p>
              下面我主要讲一下<span class="fragment highlight-blue"
                >我们公司</span
              >项目开发<span class="fragment highlight-red">分支</span>的<span
                class="fragment highlight-green"
                >使用和管理</span
              >
            </p>
          </section>
        </section>
        <section data-transition="fade">
          <section>
            <p>创建分支以pi-heng项目为例</p>
            <pre style="display: inline-block" class="fragment fade-up">
              <p><span style="color: aqua;">开发分支</span> ：feature-1.0 -> feature-2.2</p>
              <code style="font-size: 13px;">
                1.feature分支只能部署在 开发环境
                2.feature分支是所有需求（feature-1.x-coupon-hhs、feature-2.x-message-wqn ...）的集合分支,不能直接在feature-x.x上直接修改
                3.禁止feature-x.x 合并到 feature-1.x-coupon-hhs（个人分支）
                4.每次上线过后feature-x.x 都会上升一个版本，如果改版本周期较长，中间也会升版本。每次升版本都会在群里告知大家
                5.feature分支由大家自行合并部署
              </code>
          </pre>
          </section>
          <section>
            <pre>
              <p><span style="color: blueviolet;">转测分支</span> ：release-1.0 -> release-2.3</p>
              <code style="font-size: 13px;">
                1.release分支只能部署在 测试环境
                2.release 由张红军、李进负责合并部署
                release-1.5 可能由 feature-1.5-coupon-hhs、feature-1.5-message-wqn ...组成;
                3.禁止release-x.x 合并到 feature-1.x-coupon-hhs（个人分支）
                4.每次上线过后release-x.x 都会上升一个版本，如果改版本周期较长，中间也会升版本。每次升版本都会在群里告知大家
            </code>
          </pre>
          </section>
          <section>
            <pre>
              <p><span style="color: blueviolet;">客户验收分支</span> dev</p>
              <code style="font-size: 13px;">
                1.dev 由张红军、李进负责合并部署
                2.如何预发布环境上需要修改bug
                从dev上切分支release-bug-xx-hhs 修改，由张红军、李进负责合并到release-x.x部署测试环境验证
                部署验证通过后，在让张红军、李进负责release-bug-xx-hhs合并到 dev部署预发布环境。
                最后自己把release-bug-xx-hhs合并到自己的feature-1.5-coupon-hhs里面
            </code>
          </pre>
          </section>
          <section>
            <pre>
              <p><span style="color: brown;">分支清理</span></p>
              <code style="font-size: 13px;">
                每一阶段的bug修复/需求开发完成后都需要将自己的分支进行清理，在确保自己本地代码合并到主分支后进行一下操作
                1.删除本地分支
                git branch -d feature-1.4-coupon-hhs;
                2.删除远程分支
                git push origin --delete feature-1.4-coupon-hhs;
            </code>
          </pre>
          </section>
          <section>
            <pre>
              <p>升了版本怎么操作呢?</p>
              <code style="font-size: 13px;">
              升版本后feature-1.5。 自己的分支feature-1.4-coupon-hhs。
              当下一次feature-1.4-coupon-hhs提交commit后
              git checkout feature-1.5;
              git pull;
              git merge feature-1.4-coupon-hhs;(有冲突解决冲突，不清楚的找我和李进,保证代码正常运行)
              git pull;
              git push;
              git branch -d feature-1.4-coupon-hhs;
              git push origin --delete feature-1.4-coupon-hhs;
              git checkout -b feature-1.5-coupon-hhs;
              good!
            </code>
          </pre>
          </section>
        </section>
        <!-- 分工 -->
        <section data-transition="zoom">
          <p>每个人主要负责的内容</p>
          <p style="font-size: 17px;text-align: left;">吴青南：B端消息、商城C端、C端停车</p>
          <p style="font-size: 17px;text-align: left;">李进：B端会员、粉丝、标签、B端积分、成长值、B端会员等级</p>
          <p style="font-size: 17px;text-align: left;">汪亚章：商城B端、B端订单、其他项目C端</p>
          <p style="font-size: 17px;text-align: left;">王燕：活动市场、B端活动管理、B端签到、B端报表</p>
          <p style="font-size: 17px;text-align: left;">侯红申：B端优惠券、券核销、B端停车、服务商入驻</p>
          <p style="font-size: 17px;text-align: left;">石晓蓉：B端审批、B端游戏、B端订单补录、全程B、C</p>
          <p style="font-size: 17px;text-align: left;">阎凯歌：B端广告位、B端渠道、C端订单补录、全程B、C</p>
          <p style="font-size: 17px;text-align: left;">张红军：B端管理平台</p>
        </section>
        <section data-transition="concave">
          <p>Tell him in professional terms, I have no bugs</p>
          <p style="display: inline-block" class="fragment fade-left">用专业的术语告诉他，我没有bug</p>
          <p style="display: inline-block" class="fragment fade-right">愿大家每天都能学到东西，谢谢</p>
        </section>
        <!-- 动态效果 -->
        <!-- <section>
          <p class="fragment grow">grow</p>
          <p class="fragment shrink">shrink</p>
          <p class="fragment fade-out">fade-out</p>
          <p>
            <span style="display: inline-block" class="fragment fade-right"
              >fade-right,
            </span>
            <span style="display: inline-block" class="fragment fade-up"
              >up,
            </span>
            <span style="display: inline-block" class="fragment fade-down"
              >down,
            </span>
            <span style="display: inline-block" class="fragment fade-left"
              >left</span
            >
          </p>
          <p class="fragment fade-in-then-out">fade-in-then-out</p>
          <p class="fragment fade-in-then-semi-out">fade-in-then-semi-out</p>
          <p>
            Highlight <span class="fragment highlight-red">red</span>
            <span class="fragment highlight-blue">blue</span>
            <span class="fragment highlight-green">green</span>
          </p>
        </section> -->
        <!-- 切场动画 -->
        <!-- <section href="?transition=none#/transitions">
          <p>
            <a href="?transition=fade#/transitions">Fade</a> -
            <a href="?transition=slide#/transitions">Slide</a> -
            <a href="?transition=convex#/transitions">Convex</a> -
            <a href="?transition=concave#/transitions">Concave</a> -
            <a href="?transition=zoom#/transitions">Zoom</a>
          </p>
          
        </section> -->
      </div>
    </div>

    <script src="dist/reveal.js"></script>
    <script src="plugin/notes/notes.js"></script>
    <script src="plugin/markdown/markdown.js"></script>
    <script src="plugin/highlight/highlight.js"></script>
    <script>
      // More info about initialization & config:
      // - https://revealjs.com/initialization/
      // - https://revealjs.com/config/
      Reveal.initialize({
        hash: true,

        // Learn about plugins: https://revealjs.com/plugins/
        plugins: [RevealMarkdown, RevealHighlight, RevealNotes],
      });
    </script>
  </body>
</html>
